from app import create_app

app = create_app()

#法1
@app.route('/hello/')
def hello():
    return 'Hello, fisher'

# 法2
app.add_url_rule('/hello2', view_func=hello)

if __name__ == "__main__":
    print("id为" + str(id(app)) + "的app启动")
    app.run(host=app.config["HOST"], debug=app.config["DEBUG"], port=app.config["PORT"], threaded=True)
    # app.run(host='0.0.0.0', debug=True)
